FROM 192.168.11.18:5000/ubuntu_monit
MAINTAINER Chris Song songchuansheng@91waijiao.com

RUN apt-get install -y nginx php5-fpm php5-mysqlnd php5-curl php5-gd php5-imagick

ADD files/nginx.conf /etc/nginx/nginx.conf
ADD files/nginx-default /etc/nginx/sites-available/default
#RUN ln -s /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default
ADD files/php5-fpm-pool.d-www.conf /etc/php5/fpm/pool.d/www.conf
ADD files/php-fpm.conf /etc/php5/fpm/php-fpm.conf

ADD files/check-nginx /etc/monit/conf.d/check-nginx
ADD files/check-phpfpm /etc/monit/conf.d/check-phpfpm

ADD files/thrift_0.9.0-1_amd64.deb /tmp/thrift_0.9.0-1_amd64.deb
RUN dpkg -i /tmp/thrift_0.9.0-1_amd64.deb && rm /tmp/thrift_0.9.0-1_amd64.deb

ADD files/phpredis-2.2.4_x86_64.deb /tmp/phpredis-2.2.4_x86_64.deb
RUN dpkg -i /tmp/phpredis-2.2.4_x86_64.deb && rm /tmp/phpredis-2.2.4_x86_64.deb

ADD docker_nginx_start.sh /docker_nginx_start.sh

VOLUME "/var/log/nginx"

EXPOSE 80

CMD "/docker_nginx_start.sh"

